--[[------------------------------------------玩家回合结束------------------------------------------------------]]--
local Action_PlayerRoundEnd = 
{
}

function Action_PlayerRoundEnd:Execute()
    print("Action_PlayerRoundEnd:Execute")
    -- 判断整局游戏是否结束（3个玩家结束了游戏）
    if UGCGameSystem.GameState:IsGameFinished() then
        print("Action_PlayerRoundEnd GameFinished")
        LuaQuickFireEvent("GameFinished", self)
        return
    end
    -- 判断玩家是否结束游戏
    if UGCGameSystem.GameState:HasTeamFinishedGame(UGCGameSystem.GameState.CurRoundTeamIndex) then
        -- 已经结束的玩家，不需要再来一回合
        print("Action_PlayerRoundEnd PlayerFinishedGame")
        UGCGameSystem.GameState.CanPlayerStartAnotherRound = false
        LuaQuickFireEvent("PlayerFinishedGame", self)
    end
    
    -- 开始新回合
    if UGCGameSystem.GameState.CurRoundStatus == ERoundStatus.RoundEnd then
        print("Action_PlayerRoundEnd PlayerStartNewRound")
        LuaQuickFireEvent("PlayerStartNewRound", self)
    end
	return true
end

return Action_PlayerRoundEnd